package com.jungle.mvvm.sample.ui.project;

import com.jungle.mvvm.sample.api.ProjectApi;
import com.jungle.mvvm.sample.bean.ArticleBean;
import com.jungle.mvvm.sample.bean.KindBean;
import com.jungle.mvvm.sample.bean.ListBean;
import com.jungle.mvvm.sample.bean.SameBean;
import com.jungle.mvvm.sample.http.WanNetwork;

import java.util.List;

import io.reactivex.Observable;

/**
 * @ClassName ProjectModel
 * @Description ProjectModel
 * @Author Daniel
 * @Version V1.0.0
 */
public class ProjectModel {

    public static Observable<SameBean<List<KindBean>>> getProjectTree() {
        return WanNetwork.getService(ProjectApi.class)
                .getProjectTree();
    }

    public static Observable<ListBean<List<ArticleBean>>> getProjectArticle(int size, int cid) {
        return WanNetwork.getService(ProjectApi.class)
                .getProjectArticle(size, cid);
    }
}
